﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Production
{
    public class Stock : BusinessObject
    {
        public Stock()
        {
            AddRule(new ValidateRequired("StockCode"));
            AddRule(new ValidateLength("StockCode", 0, 20));

            AddRule(new ValidateRequired("StockName"));
            AddRule(new ValidateLength("StockName", 0, 255));

            AddRule(new ValidateRequired("RestaurantID"));
        }

        public Stock(string stockId, string stockCode, string stockName, string description, string restaurantId, bool isActive)
        {
            StockID = stockId;
            StockCode = stockCode;
            StockName = stockName;
            Description = description;
            RestaurantID = restaurantId;
            IsActive = isActive;
        }

        public string StockID { get; set; }

        public string StockCode { get; set; }

        public string StockName { get; set; }

        public string Description { get; set; }

        public string RestaurantID { get; set; }

        public bool IsActive { get; set; }
    }
}
